package cfca.seal.front.service.ws.bean;

import cfca.seal.util.StringUtil;

public class ClientSealBean
{
  private String type;
  private String page;
  private String lx;
  private String ly;
  private String keyword;
  private String locationStyle;
  private String offsetX;
  private String offsetY;
  private String hashAlg;

  public String getType()
  {
    return this.type;
  }

  public void setType(String type) {
    this.type = type;
  }

  public String getPage() {
    return this.page;
  }

  public void setPage(String page) {
    this.page = page;
  }

  public String getLx() {
    return this.lx;
  }

  public void setLx(String lx) {
    this.lx = lx;
  }

  public String getLy() {
    return this.ly;
  }

  public void setLy(String ly) {
    this.ly = ly;
  }

  public String getKeyword() {
    return this.keyword;
  }

  public void setKeyword(String keyword) {
    this.keyword = keyword;
  }

  public String getLocationStyle() {
    return this.locationStyle;
  }

  public void setLocationStyle(String locationStyle) {
    this.locationStyle = locationStyle;
  }

  public String getOffsetX() {
    return this.offsetX;
  }

  public void setOffsetX(String offsetX) {
    this.offsetX = offsetX;
  }

  public String getOffsetY() {
    return this.offsetY;
  }

  public void setOffsetY(String offsetY) {
    this.offsetY = offsetY;
  }

  public String getHashAlg() {
    return this.hashAlg;
  }

  public void setHashAlg(String hashAlg) {
    this.hashAlg = hashAlg;
  }

  public ClientSealBean(String xml) {
    this.type = StringUtil.getNodeText(xml, "Type");
    this.page = StringUtil.getNodeText(xml, "Page");
    this.lx = StringUtil.getNodeText(xml, "LX");
    this.ly = StringUtil.getNodeText(xml, "LY");
    this.keyword = StringUtil.getNodeText(xml, "Keyword");
    this.locationStyle = StringUtil.getNodeText(xml, "LocationStyle");
    this.locationStyle = (StringUtil.isEmpty(this.locationStyle) ? "C" : this.locationStyle);
    this.offsetX = StringUtil.getNodeText(xml, "OffsetX");
    this.offsetX = (StringUtil.isEmpty(this.offsetX) ? "0" : this.offsetX);
    this.offsetY = StringUtil.getNodeText(xml, "OffsetY");
    this.offsetY = (StringUtil.isEmpty(this.offsetY) ? "0" : this.offsetY);
    this.hashAlg = StringUtil.getNodeText(xml, "HashAlg");
  }
}